<template>
  <div>
    <p>module</p>
    <button @click="handleImport">加载foo模块</button>
    <p v-if="name">{{ name }}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: null
    }
  },
  methods: {
    handleImport() {
      import('./Components/Foo').then(({ name }) => {
        this.name = name
      })
    }
  }
}
</script>

<style></style>
